package com.woniuxy.service.impl;

import com.woniuxy.entity.Car;
import com.woniuxy.mapper.CarMapper;
import com.woniuxy.service.CarService;
import com.woniuxy.vo.CarVO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CarServiceImpl implements CarService {
    @Resource
    private CarMapper carMapper;
    @Override
    public List<CarVO> selectCarByCampId(Integer campId) throws Exception {
        return carMapper.selectCarByCampId(campId);
    }

    @Override
    public int selectCarId(String carName) throws Exception {
        return carMapper.selectCarIdByCarName(carName);
    }

    @Override
    public int updateCarStatus(Car car) throws Exception {
        return carMapper.updateByPrimaryKeySelective(car);
    }
}
